import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/deal_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class DealEntity {
	late int code;
	late String msg;
	late List<DealData> data;

	DealEntity();

	factory DealEntity.fromJson(Map<String, dynamic> json) => $DealEntityFromJson(json);

	Map<String, dynamic> toJson() => $DealEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class DealData {
	 String title='';
	 String name ='';
	@JSONField(name: "sell_price")
	late String sellPrice;
	@JSONField(name: "tra_time")
	late String traTime;

	DealData();

	factory DealData.fromJson(Map<String, dynamic> json) => $DealDataFromJson(json);

	Map<String, dynamic> toJson() => $DealDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}